package com.suprema.biomini;

/**
 * 樣本錯誤狀態
 * @author Kent Yeh
 */
public class EnrollException extends Exception {

    private EnrollType enrollType = null;

    public EnrollType getEnrollType() {
        return enrollType;
    }

    public EnrollException(Throwable cause) {
        super(cause);
    }

    public EnrollException(String message, Throwable cause) {
        super(message, cause);
    }

    public EnrollException(String message) {
        super(message);
    }

    public EnrollException(EnrollType enrollType) {
        this(enrollType.toString(), enrollType);
    }

    public EnrollException(String message, EnrollType enrollType) {
        super(message);
        assert !EnrollType.SF_SUCCESS.equals(enrollType) : "樣本資料狀態無誤，不應建立樣本錯誤狀態";
        this.enrollType = enrollType;
    }

    public EnrollException() {
    }
}
